<div class="row-content am-cf">
    <div class="row">
        <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-cf">代理分润明细</div>
                </div>
                <div class="am-u-sm-12">
                    <a href="<?= $user['avatarUrl'] ?>" title="点击查看大图" target="_blank">
                        <img class="am-circle" src="<?= $user['avatarUrl'] ?>" width="56" height="56" alt="">
                    </a>
                    <?=$user['nickName']?>
                    <?=$user['agentName']?>
                    <?=$user['province']?>
                    <?=$user['city']?>
                    <?=$user['zone']?>

                </div>
                <div class="page_toolbar am-margin-bottom-xs am-cf">
                    <form class="toolbar-form" action="">
                        <input type="hidden" name="s" value="/store/user/sale">
                        <div class="am-u-sm-12 ">
                            <div class="am fr">
                                <div class="am-form-group am-fl">
                                    <input
                                            data-am-datepicker
                                            type="text" class="am-form-field"
                                           name="start_time"
                                           value="<?= isset($_GET['start_time'])?$_GET['start_time']:'' ?>"
                                           placeholder="起始时间" id="start-time"/>
                                </div>
                                <div class="am-form-group am-fl">
                                    <input type="text" class="am-form-field"
                                           data-am-datepicker
                                           name="end_time"
                                           value="<?= isset($_GET['end_time'])?$_GET['end_time']:'' ?>"
                                           placeholder="结束时间" id="end-time"/>
                                </div>

                                <div class="am-form-group am-fl">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form">
                                        <div class="am-input-group-btn">
                                            <button class="am-btn am-btn-default am-icon-search" type="submit"></button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="widget-body am-fr">

                    <div class="am-scrollable-horizontal am-u-sm-12">
                        <table width="100%" class="am-table am-table-compact am-table-striped
                         tpl-table-black am-text-nowrap">
                            <thead>
                            <tr>
                                <th>记录ID</th>
                                <th>订单号</th>
                                <th>下单者</th>
                                <th>头像</th>
                                <th>级别</th>
                                <th>订单金额</th>
                                <th>分润</th>
                                <th>时间</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if (!$list->isEmpty()): foreach ($list as $item): ?>
                                <tr>
                                    <td class="am-text-middle"><?= $item['commission_log_id'] ?></td>
                                    <td class="am-text-middle">
                                        <a href="<?=url('/store/order/detail/order_id/').$item['order_id']?>">
                                            <?= $item['order_no'] ?>
                                        </a>
                                    </td>
                                    <td class="am-text-middle"><?= $item['nickName'] ?></td>
                                    <td class="am-text-middle">
                                        <a href="<?= $item['avatarUrl'] ?>" title="点击查看大图" target="_blank">
                                            <img class="am-circle" src="<?= $item['avatarUrl'] ?>" width="56" height="56" alt="">
                                        </a>
                                    </td>
                                    <td class="am-text-middle"><?= $item['agentName'] ?></td>
                                    <td class="am-text-middle"><?= $item['pay_price'] ?: '--' ?></td>
                                    <td class="am-text-middle"><?= $item['money'] ?: '--' ?></td>
                                    <td class="am-text-middle"><?= $item['create_time'] ?: '--' ?></td>
                                </tr>
                            <?php endforeach; else: ?>
                                <tr>
                                    <td colspan="8" class="am-text-center">暂无记录</td>
                                </tr>
                            <?php endif; ?>
                            </tbody>
                        </table>
                    </div>
                    <div class="am-u-lg-12 am-cf">
                        <div class="am-fr"><?= $list->render() ?> </div>
                        <div class="am-fr pagination-total am-margin-right">
                            <div class="am-vertical-align-middle">总记录：<?= $list->total() ?></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {

    });
</script>

